﻿-- =========================================================================================================
-- Author:		MICHAEL RITACCO
-- Copyright:	2010 MEKHANO GROUP LLC
-- Version:		10/02/2010 1.0
-- =========================================================================================================
CREATE PROCEDURE [flcr].[api_device_dimensions_sel_lov]
@DEVICE_DIM_ID INT = NULL
,@DEVICE_PLATFORM_ID INT = NULL

AS
BEGIN TRY
  
	SELECT	A.[DEVICE_DIM_ID] 
			,A.[DEVICE_PLATFORM_ID]
			,B.[PLATFORM_NAME] 
	  FROM	[FLCR].[DEVICE_DIMENSIONS] A
	 INNER JOIN [FLCR].[DEVICE_PLATFORM] B
		ON	A.[DEVICE_PLATFORM_ID] = B.[DEVICE_PLATFORM_ID]
     WHERE	A.[DEVICE_DIM_ID] = COALESCE(@DEVICE_DIM_ID,A.[DEVICE_DIM_ID])
	   AND	A.[DEVICE_PLATFORM_ID] = COALESCE(@DEVICE_PLATFORM_ID,A.[DEVICE_PLATFORM_ID])

END TRY
BEGIN CATCH
	EXEC [flcr].[utl_getDBError];
END CATCH
